<template>
    <div v-if="!isShowReg" class="bg overflow-hidden">
        <img src="../images/publisherCon.webp" alt="" class="w-full">
        <div class="text-center mt-[-55px]">
            <img src="../images/logo.webp" alt="" class="w-83px">
            <p class="text-24px font-bold lh-36px mt-12px">享受平台推广资源</p>
            <p class="text-15px lh-36px">获得更多曝光 匹配精准用户</p>
            <div class="my-22px">
                <nut-button class="!border-none !w-188px !h-39px !text-#611a7a !font-bold" @click="isShowReg = true">
                    申请成为发布者
                </nut-button>
            </div>
            <div class="my-22px mb-50px">
                <nut-button class="!border-none !w-188px !h-39px !text-#611a7a !font-bold"
                    @click="publisherLoginVisible = true">
                    已经是发布者
                </nut-button>
            </div>
        </div>
    </div>
    <regPublisher v-else @close="isShowReg = false"></regPublisher>
</template>

<script setup>
import regPublisher from './regPublisher.vue'
import { ref, inject } from 'vue'
const publisherLoginVisible = inject('publisherLoginVisible')
const isShowReg = ref(false)

</script>

<style lang="scss" scoped>
.bg {
    background: url("../images/publisherBg.webp") no-repeat center center;
    background-size: 100% 100%;
}

.auth-dialog {
    width: 100%;
    height: 100%;
    background-color: #3f3f3f;
    padding-bottom: 50px;
    position: relative;

    .tab {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 40px;

        &>div {
            flex: 1;
            background: #000000;
            height: 100%;
            line-height: 40px;
            text-align: center;
            color: #fff;
            font-weight: 600;
            font-size: 16px;
            position: relative;
            // transition: all 0.1s ease;

            &::after {
                content: "";
                display: block;
                width: 30px;
                height: 2px;
                background: #e53156;
                position: absolute;
                bottom: 2px;
                left: 50%;
                transform: translateX(-50%);
                opacity: 0;
            }
        }

        .active {
            background: transparent !important;

            &::after {
                opacity: 1;
            }
        }
    }

    .welcome-text {
        text-align: center;
        color: #fff;
        margin: 10px 0;

        &>div:first-child {
            font-size: 23px;
        }

        &>div:last-child {
            font-size: 12px;
            font-weight: 300;
        }
    }

    .input-box {
        padding: 0 13px;

        :deep(.nut-cell-group__wrap) {
            background: transparent;
            box-shadow: none;
            margin-bottom: 0;

            .nut-form-item {
                margin-bottom: 21px;
                background: #000;
                border-radius: 3px;
                padding-left: 12px;
                position: relative;

                &::after,
                &::before {
                    display: none;
                }

                input {
                    transform: translateY(1px);
                }

                .nut-form-item__body__tips {
                    position: absolute;
                    top: 100%;
                    left: 12px;
                    width: 100%;
                    transform: translateY(1px);
                }
            }
        }

        .submit-btn {
            margin-top: 5px;
            padding: 0 20px;

            .nut-button {
                font-weight: bold;
                background-image: linear-gradient(to right, #6dc0f9, #d308fe);
                letter-spacing: 1px;
            }
        }

        .or-divider {
            padding: 0 10px;
            text-align: center;

            .nut-divider {
                color: #777;
                margin: 7px 0;
            }
        }

        .forgot-password {
            text-align: center;
            color: #fff;
            font-size: 14px;
        }

        .footer-text {
            text-align: center;
            color: #d7d7d7;
            font-size: 12px;
            margin-top: 60px;

            a {
                color: #fff;
                font-weight: bold;
            }
        }
    }
}
</style>
